import { Context } from "koa";

export class HomeController {
  public static async index(ctx: Context) {
    ctx.body = {
      message: "Hello, Koa 3!",
      timestamp: new Date().toISOString(),
    };
  }

  public static async about(ctx: Context) {
    ctx.body = {
      name: "Koa 3 Server",
      version: "1.0.0",
      description: "A simple Koa 3 server with TypeScript",
    };
  }

  public static async test(ctx: Context) {
    ctx.body = {
      status: "ok",
      message: "测试控制器2222",
      timestamp: new Date().toISOString(),
    };
  }
}
